<?php

namespace App\Console;

use App\Console\Commands\EduReward;
use App\Console\Commands\Energy;
use App\Console\Commands\YjDay;
use App\Console\Commands\WishEnd;
use App\Console\Commands\Group;
use App\Console\commands\Auth;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
    /**
     * The Artisan commands provided by your application.
     *
     * @var array
     */
    protected $commands = [
        //
		YjDay::class,
		Energy::class,
		WishEnd::class,
		EduReward::class,
        Group::class,
        Auth::class,
    ];

    /**
     * Define the application's command schedule.
     *
     * @param  \Illuminate\Console\Scheduling\Schedule  $schedule
     * @return void
     */
    protected function schedule(Schedule $schedule)
    {
//         $schedule->command('inspire')
//                  ->hourly();
        $schedule->command('yjday')->dailyAt('00:00');//30天清空个人和团队业绩
        $schedule->command('vipday')->dailyAt('01:00');//365银卡到期,会员降级,仓库关闭,天数清空
        $schedule->command('energy')->dailyAt('05:00');//凌晨5点  清楚用户的签到油桶
        $schedule->command('wishend')->dailyAt('00:00');//凌晨 处理失效心愿单
        $schedule->command('EduReward')->dailyAt('00:10');//凌晨 发教育奖
//        $schedule->command('EduReward')->everyMinute();//凌晨 发教育奖
        $schedule->command('group')->dailyAt("00:00");//拼团定时关闭
        $schedule->command('auth')->dailyAt("00:00");//实名认证
    }

    /**
     * Register the commands for the application.
     *
     * @return void
     */
    protected function commands()
    {
        $this->load(__DIR__.'/Commands');

        require base_path('routes/console.php');
    }
}
